﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;
using Chromos.Actors;
using Chromos.PhysicsEngine;

namespace Chromos.ActionEngine
{
	public enum ForceType
	{
		ForceInstant,
		ForceContinuous
	}

	public abstract class Action
	{
		protected Actor actor;
		protected ForceType forceType;

		// Physical and attributal
		protected Vector2 force;
		protected bool appliedForce;

		protected ContentManager content;

		public Action(Actor actor, ContentManager content, Vector2 force, ForceType forceType)
		{
			this.actor = actor;
			this.content = content;
			this.force = force;
			this.forceType = forceType;
			appliedForce = false;
		}

		// Loads the list of images represented by strings
		public abstract void load();

		/// <summary>
		/// The only thing that should be called when using the Action
		/// </summary>
		public abstract void act();

		public abstract void start();
		public abstract void stop();
		public abstract void stopWithForce();

		protected abstract void applyForce();
		protected abstract void unapplyForce();
	}
}
